package tres;

import java.util.Scanner;

public class FacildeDecir {
	static char word[];
	static int len;

	static boolean isVowel(char ch) {
		if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
			return true;
		return false;
	}

	static boolean rule_1() {
		for (int i = 0; i < len; i++)
			if (isVowel(word[i]))
				return true;
		return false;
	}

	static boolean rule_2() {
		int i, v = 0, c = 0;
		for (i = 0; i < len; i++) {
			if (isVowel(word[i])) {
				v++;
				c = 0;
			} else {
				c++;
				v = 0;
			}
			if (v == 3 || c == 3)
				return false;
		}
		return true;
	}

	static boolean rule_3() {
		for (int i = 1; i < len; i++) {
			if (word[i] == word[i - 1] && word[i] != 'e' && word[i] != 'o')
				return false;
		}
		return true;
	}

	public static void main(String args[]) {
		String line;
		Scanner in = new Scanner(System.in);
		while (true) {
			line = in.next();
			if (line.equals("end"))
				break;
			word = line.toCharArray();
			len = line.length();
			if (rule_1() && rule_2() && rule_3())
				System.out.println("<" + line + "> is acceptable.");
			else
				System.out.println("<" + line + "> is not acceptable.");
		}
	}
}
